using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using WPCoco;

namespace CocoCube
{
    public class Node3D : Node, ILocalized3D
    {
        #region 3D Node Addion

        Layer3D parentLayer = null;

        public Layer3D ParentLayer
        {
            get { return parentLayer; }
            set { parentLayer = value; }
        }

        public Camera Camera 
        {
            get 
            { 
                if (parentLayer == null) return null;
                return parentLayer.Camera;
            } 
        }

        public override void AddNode(Node node)
        {
            if (!(node is Node3D)) return;
            base.AddNode(node);
            ((Node3D)node).parentLayer = parentLayer;
        }

        public override void AddNode(Node node, int zOrder)
        {
            node.ZOrder = zOrder;
            AddNode(node, zOrder);
        }

        protected override void HasBeenRemoved(Node node)
        {
            ((Node3D)node).parentLayer = null;
        }

        #endregion

        #region ILocalized3D

        public Vector3 Position
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public Vector3 Size
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public Vector3 Anchor
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public Vector3 Scale
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public Vector3 Rotation
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion
    }
}
